package com.p2p.service.contentManagementService;

import com.p2p.common.R;
import com.p2p.common.base.RespResult;
import com.p2p.common.view.CarouselVo;
import com.p2p.entity.Carousel;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

public interface CarouselService {

    /**
     * 添加图片
     * @param img
     * @param id
     * @param request
     * @return
     */
    RespResult addCarouselImg(MultipartFile img, Integer id, HttpServletRequest request);

    /**
     * 添加广告
     * @param carousel
     * @return
     */
    RespResult addCarousel(Carousel carousel);

    /**
     * 删除广告
     * @param id
     * @return
     */
    RespResult deleteCarouselById(Integer id);

    /**
     * 条件查询广告
     * @param carouselVo
     * @return
     */
    RespResult findCarouselByCondition(CarouselVo carouselVo);

    /**
     * 查询所有广告
     * @param carouselVo
     * @return
     */
    RespResult findAllCarousel(CarouselVo carouselVo);

    /**
     * 通过id查询广告
     * @param id
     * @return
     */
    RespResult findCarouselById(Integer id);

    /**
     * 修改轮播广告信息
     * @param carousel
     * @return
     */
    RespResult updateCarousel(Carousel carousel);
}
